//// http://www.boost.org/doc/libs/1_47_0/libs/range/doc/html/range/reference/adaptors/introduction.html
//
//#include <iostream>
//#include <vector>
//
//#include <boost/range/adaptors.hpp>
//#include <boost/range/algorithm.hpp>
//#include <boost/phoenix/core/argument.hpp>
//#include <boost/phoenix/operator.hpp>
//
//
//using boost::range::copy;
//using boost::adaptors::reverse;
//using boost::adaptors::reversed;
//
//using boost::adaptors::uniqued;
//
//using boost::adaptors::filtered;
//
//using boost::phoenix::arg_names::arg1;
//
//
//
////template <typename Pred>
////void println( Pred const& pred )
////{
////	pred();
////	std::cout << std::endl;
////}
//
//
//
//
//int main()
//{
//	
//	
//
//	int temp[] = { 1, 2, 3, 4, 5, 3, 9, 2 };
//
//	std::vector<int> vec(temp, temp+8);
//	
//	copy( vec | reversed, std::ostream_iterator<int>(std::cout) );
//	std::cout << std::endl;
//
//	copy( reverse(vec), std::ostream_iterator<int>(std::cout) );
//	std::cout << std::endl;
//
//	//---------------
//
//	//copy( unique( reverse( vec ) ), std::ostream_iterator<int>(std::cout) );
//	copy( vec | reversed
//              | uniqued,
//			std::ostream_iterator<int>(std::cout) );
//
//	std::cout << std::endl;
//
//
//	copy( vec | filtered([](int x){ return x % 2==0; }), 
//					std::ostream_iterator<int>(std::cout) );
//
//	std::cout << std::endl;
//
//	copy( vec | filtered( arg1 % 2 == 0 ), 
//					std::ostream_iterator<int>(std::cout) );
//
//	std::cout << std::endl;
//
//
//	//println( [&]{  copy( vec | reversed, std::ostream_iterator<int>(std::cout) );  } );
//
//	return 0;
//}
//
//
//
////-----------------------------------------------------------------
//
////#include <map>
////#include <vector>
////
////
////#include <boost/range.hpp>
////
////using namespace boost;
////using namespace boost::adaptors;
////
////int main()
////{
////
////	std::vector<int> target;
////	std::map<int, int> my_map;
////
////
////	push_back(target, my_map | map_values | filtered(is_even()) | reversed);
////}
//
